2 Before you begin
All course modules will start with a Before you begin section. In these sections, you will download data and scripts required to complete the module, install any required packages, and take other necessary steps before diving into the material. In this lesson, you will learn:
- How to set your global options for this course;
- How to open an RStudio project;
- Steps that you should take each time you initiate a session.
Important! Before starting this lesson, be sure that you have followed the steps provided in Lesson 1.1: Installing R and RStudio to install the most current version of R and RStudio. This lesson also assumes that you are familiar with the concepts and terminology covered in Lesson 1.3: The RStudio IDE.
2.1 Set your global options
RStudio’s global options define the behavior and layout of the RStudio IDE every time you open the program. Here, we will modify your global options to ensure that they are set to maximize your success in this course (and beyond).
Please follow the steps in the video below to set up your global options:
2.2 Set up your session
An R Studio session represents the time spent and operations conducted since opening R.
2.2.1 Open an RStudio project
A session is initiated by opening a project in RStudio. A project is a folder that contains a collection of files (e.g., scripts, data, output) and sub-folders. The parent folder is designated as a project if it includes a .Rproj file. All content for this course will be stored in a project and all code will be executed from within this project.
We can open our project in one of four ways:
The project menu ()
Note: If you use this method, you can open a recent project by simply clicking on the name from the list of options at the bottom of the dropdown menu.
- Open RStudio
- Click the blue square in the upper right of the window
- Navigate to “Open Project …”
- Navigate to your project in the window that opens
- Double-click on the .Rproj file.
The file menu
- Open RStudio
- In the top menu bar, click “File”
- Navigate to “Open Project …”
- Navigate to your project in the window that opens
- Double-click on the .Rproj file.
Using a keyboard shortcut
- Open RStudio
- Hit the keyboard shortcut Control + O (Windows) or Command + O (Mac)
- Navigate to your project in the window that opens
- Double-click on the .Rproj file.
- Hit enter on the following pop-up menu.
Windows Explorer () or Finder (
)